feat(ui): seven quick actions on the homepage — operations visible before upload - #145
Merged
Merged
Conversation
…fore upload Before a file was chosen, the homepage's tool card offered no concrete operation — just the Convert/Compress toggle and an empty target-format dropdown — and the PDF tools sat as small text links in a "More tools" box below the fold. First visible step of surfacing operations earlier: - The tool card now shows, under the drop zone, an "Or choose directly" label with seven chip links — Compress PDF, JPG to PDF, Word to PDF, Split PDF, Extract PDF pages, HEIC to JPG, Compress image (KB/MB) — and "All tools →". Every chip targets a page that already exists; "(KB/MB)" says file size, since pixel resizing isn't built. - Homepage-only: partials/convert_tool.html also renders /compress and the 12 /convert/<pair> pages, so a show_quick_actions flag set only by index() keeps self-links and a diluted row off them. - Server-rendered <nav> + list of <a>, no inline JS (CSP), links always in the initial HTML (IA invariant G6). The chips are an idle-state shortcut: app.js setQuickActionsVisible() hides them once files are chosen and shows them again when the selection is cleared — otherwise they pushed the Convert button ~345 px down on a phone (found in review). - Secondary chip styling so Convert stays the card's only brand-filled control; 44 px touch targets; label text-gray-400 (6.9:1) and brand-light link (5.9:1) for AA contrast; focus ring on every link. - The "More tools" box is removed (its links live in the chips); the subline gains "PDF". Redact is no longer teased on the homepage — footer and /tools still link it when enabled, and it never belongs among idle chips (free path before paid). - scripts/i18n.py update passes --ignore-obsolete, so removed msgids are dropped instead of piling up as "#~" blocks (none since c8fc734). Deferred on purpose: category links (PDF · Images · …) until /tools has matching sections; the toggle, dropdown and Convert button until the Smart-Drop step replaces them. Tests: test_homepage_quick_actions.py replaces test_homepage_more_tools.py — exact link list on /en and /de, localized labels without leakage, absent on /compress and a pair page, every target answers 200, <main> never links /redact, app.js hides/shows the row; the heading-outline guards moved to test_homepage_outline.py (h2 pins 4/5/4). Rebased onto #143 (catalogs regenerated, 0 fuzzy, 0 obsolete). Browser-checked at 1280 px and 375 px, including the file-selected state. Full suite 1230 green (63 skipped); ruff + format + template-class gate + i18n-drift clean; Tailwind bundle tailwind.86732528.css reproducible. Reviewed by security-auditor (pass) and code-reviewer (nits applied). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Step 2 of making operations visible: the homepage now shows seven quick actions before any file is chosen.
The chips: under the drop zone, an "Or choose directly" label with seven chip links, followed by an "All tools →" link:
Every chip goes to a page that already exists.
Homepage only:
/compressand the 12/convert/<pair>pages render the same partial, so ashow_quick_actionsflag keeps the chips off those pages.No inline JS:
app.jshides the chip row while files are selected and shows it again when the selection is cleared.Removed: the "More tools" box. Its links now live in the chips.
Subline: now includes "PDF".
Redact: no longer teased on the homepage. The footer and
/toolsstill link it when it is enabled.Catalogs:
scripts/i18n.py updatenow passes--ignore-obsolete, so removed strings no longer pile up in them.Why
Before a file was chosen, the homepage showed no concrete operation, only the toggle and an empty dropdown. The PDF tools were small text links below the fold.
Deliberately not in this PR
/tools, which come in the next step.Verification
tailwind.86732528.cssrebuilds to identical output./compressand on a pair page.security-auditor: pass.code-reviewer: its nits are applied — hide on file selection, CHANGELOG wording, exact link test, outline tests moved to their own file, obsolete catalog entries dropped, focus ring on "All tools".🤖 Generated with Claude Code